<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Control Box (Arrangement)</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="ui-controls-group.settitle.html">« UI\Controls\Group::setTitle</a></li>
      <li style="float: right;"><a href="ui-controls-box.append.html">UI\Controls\Box::append »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.ui.html">UI</a></li>
    <li>Control Box (Arrangement)</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.ui-controls-box" class="reference">

 <h1 class="title">Control Box (Arrangement)</h1>
 

 <div class="partintro"><p class="verinfo">(UI 0.9.9)</p>


  <div class="section" id="ui-controls-box.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    A Box allows the arrangement of other controls
   </p>
  </div>


  <div class="section" id="ui-controls-box.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">UI\Controls\Box</strong>
     </span>
     
     <span class="ooclass">
      <span class="modifier">extends</span>
       <a href="class.ui-control.html" class="classname">UI\Control</a>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constants */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.ui-controls-box.html#ui-controls-box.constants.vertical"><var class="varname">Vertical</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.ui-controls-box.html#ui-controls-box.constants.horizontal"><var class="varname">Horizontal</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis"><span class="modifier">protected</span>
      <var class="varname"><a href="class.ui-controls-box.html#ui-controls-box.props.controls">$<var class="varname">controls</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constructor */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$orientation</code><span class="initializer"> = UI\Controls\Box::Horizontal</span></span>)</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.append.html" class="methodname">append</a></span>(<span class="methodparam"><span class="type"><span class="type Control">Control</span></span> <code class="parameter">$control</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$stretchy</code><span class="initializer"> = <strong><code>false</code></strong></span></span>): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.delete.html" class="methodname">delete</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.getorientation.html" class="methodname">getOrientation</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.ispadded.html" class="methodname">isPadded</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-controls-box.setpadded.html" class="methodname">setPadded</a></span>(<span class="methodparam"><span class="type">bool</span> <code class="parameter">$padded</code></span>)</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 继承的方法 */</div>
    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.destroy.html" class="methodname">UI\Control::destroy</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.disable.html" class="methodname">UI\Control::disable</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.enable.html" class="methodname">UI\Control::enable</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.getparent.html" class="methodname">UI\Control::getParent</a></span>(): <span class="type"><a href="class.ui-control.html" class="type UI\Control">UI\Control</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.gettoplevel.html" class="methodname">UI\Control::getTopLevel</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.hide.html" class="methodname">UI\Control::hide</a></span>()</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.isenabled.html" class="methodname">UI\Control::isEnabled</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.isvisible.html" class="methodname">UI\Control::isVisible</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.setparent.html" class="methodname">UI\Control::setParent</a></span>(<span class="methodparam"><span class="type"><a href="class.ui-control.html" class="type UI\Control">UI\Control</a></span> <code class="parameter">$parent</code></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="ui-control.show.html" class="methodname">UI\Control::show</a></span>()</div>


   }</div>


  </div>


  <div class="section" id="ui-controls-box.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="ui-controls-box.props.controls"><var class="varname">controls</var></dt>

     <dd>

      <p class="para">
       Contains controls, should not be manipulated directly
      </p>
     </dd>

    
   </dl>

  </div>

  

  <div class="section" id="ui-controls-box.constants">
   <h2 class="title">预定义常量</h2>
   <dl>

    
     <dt id="ui-controls-box.constants.vertical"><strong><code>UI\Controls\Box::Vertical</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

    
     <dt id="ui-controls-box.constants.horizontal"><strong><code>UI\Controls\Box::Horizontal</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

   </dl>

  </div>



 </div>

 











































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="ui-controls-box.append.html">UI\Controls\Box::append</a> — Append Control</li><li><a href="ui-controls-box.construct.html">UI\Controls\Box::__construct</a> — Construct a new Box</li><li><a href="ui-controls-box.delete.html">UI\Controls\Box::delete</a> — Delete Control</li><li><a href="ui-controls-box.getorientation.html">UI\Controls\Box::getOrientation</a> — Get Orientation</li><li><a href="ui-controls-box.ispadded.html">UI\Controls\Box::isPadded</a> — Padding Detection</li><li><a href="ui-controls-box.setpadded.html">UI\Controls\Box::setPadded</a> — Set Padding</li></ul>
</div>
</div></div></body></html>